<?php
class BaseService extends Service {

	/**
	 *
	 * @var viewInit
	 */
	protected $view;
	
	/**
	 * 初始化
	 */
	public function __construct() {
		parent::__construct ();
		$InitPHP_conf = InitPHP::getConfig ();
		$this->view = $this->load ( 'view', 'v' ); // 导入View
		$this->view->set_template_config ( $InitPHP_conf ['template'] ); // 设置模板
	}

	public function fetch_tpl($template) {
		$this->view->set_tpl($template);
		ob_start();
		$this->view->display();
		$content = ob_get_contents();
		ob_end_clean();

		return $content;
	}
	

}